//using UnityEngine;
//using System.Collections;

//public class MouseController : CanTakeDamage{
//    public float playerSpeed = 20.0f;
//    private Vector3 screenPoint;
//    private Vector3 offset;
//    public Transform toEdit;
//    // Use this for initialization
//    void Start () 
//    {
//        if(toEdit == null)
//            toEdit = transform;
//    }
	
//    // Update is called once per frame
//    void Update () 
//    {

//    }

 
//    void OnMouseDown()
//    {
//        offset = toEdit.position - Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, screenPoint.z));
//    }
 
//    void OnMouseDrag()
//    {
//        screenPoint = Camera.main.WorldToScreenPoint(toEdit.position);
//        Vector3 curScreenPoint = new Vector3(Input.mousePosition.x, Input.mousePosition.y, screenPoint.z);
//        Vector3 curPosition = Camera.main.ScreenToWorldPoint(curScreenPoint);	
//        Vector3 newOffset = toEdit.position - curPosition;
//        Debug.Log(newOffset);
//        toEdit.position=newOffset;
//    }
//}